package pl.agh.convexhulltutor.gui;

import javax.swing.JDialog;
import javax.swing.JTextField;

@SuppressWarnings("serial")
public class MessageBox extends JDialog {
	public static void warn(String message) {
		JDialog dialog = new JDialog();
		JTextField textField = new JTextField(message);

		textField.setHorizontalAlignment(JTextField.CENTER);
		textField.setEditable(false);

		dialog.setModal(true);
		dialog.setTitle("Warning");
		dialog.setSize(350, 65);
		dialog.setContentPane(textField);
		dialog.setLocationRelativeTo(null);

		dialog.setVisible(true);
	}
}
